import React from 'react'
import {Row,Col,message} from 'antd'
import styles from "./index.less";

class List extends React.Component{
	constructor(props){
		super(props)
		this.state = {
			
		}
	}
	click(i){
		const { changeMenu,showConfig,getCode } = this.props 
		if(i == 1){
			changeMenu(2)
		}
		if(i == 2){
			showConfig(4)
			getCode()
		}
		if(i == 3){
			message.warning("暂未开通该功能");
		}
	}
	render(){
		const {list} = this.props
		return(
			<Row>
				<Col span={8} style={{display:'flex'}} className={styles.box} onClick={this.click.bind(this, 1)}>
					<img className={styles.img} src={require("../../../assets/config1.png")} />
					<span style={{fontSize:18}}>电子资料模板管理</span>
				</Col>
				<Col span={8} style={{display:'flex'}} className={styles.box} onClick={this.click.bind(this, 2)}>
					<img className={styles.img} src={require("../../../assets/config2.png")} />
					{/* <span style={{fontSize:18}}>纸质资料模板管理</span> */}
					<span style={{fontSize:18}}>条形码配置管理</span>
				</Col>
				<Col span={8} style={{display:'flex'}} className={styles.box} onClick={this.click.bind(this, 3)}>
					<img className={styles.img} src={require("../../../assets/config3.png")} />
					<span style={{fontSize:18}}>设备管理</span>
				</Col>
			</Row>
		)
	}
}
export default List